package com.eightbears.beboy.base.util;

import android.widget.Toast;

import com.eightbears.beboy.base.BaseApplication;

public class ShowToast {


    private static long lastClickTime;

    public synchronized static boolean isFastClick() {
        long time = System.currentTimeMillis();
        if (time - lastClickTime < 1900) {
            return true;
        }
        lastClickTime = time;
        return false;
    }

    public static void showShortToast(String str) {
        Toast.makeText(BaseApplication.getContext(), str, Toast.LENGTH_SHORT).show();
    }
    public static void showShortToast(int resId) {
        Toast.makeText(BaseApplication.getContext(), resId, Toast.LENGTH_SHORT).show();
    }
    public static void showLongToast(String str) {
        Toast.makeText(BaseApplication.getContext(), str, Toast.LENGTH_LONG).show();
    }
    public static void showLongToast(int resId) {
        Toast.makeText(BaseApplication.getContext(), resId, Toast.LENGTH_LONG).show();
    }
}
